第 11 步:今天是你的幸运日!你的老师会放弃你的两个最低成绩。让我们编写一个函数来做到这一点!

  • .将Define Function with Parameter print_average()下方和外部。
  • 将函数重命名为remove_lowest_two()并将参数更改为list_of_grades
  • 拖入Docstring并对其进行编辑以描述此功能将执行的操作(它将删除最低的两个等级。)
  • Function Call with Parameter拖到main的底部。将其更改为remove_lowest_two( grades )

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)